package com.example.erp.controller.system;

import com.example.erp.dto.systemDTO.resourceDTO.ResourceDTO;
import com.example.erp.service.system.ResourceService;
import com.example.erp.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/v1/admin/system/resource")
public class ResourceController {
    @Autowired
    private ResourceService resourceService;

    @GetMapping("/list")
    private Result list(ResourceDTO resourceDTO) {
        return resourceService.list(resourceDTO);
    }

    @DeleteMapping("/remove")
    private Result remove(@RequestBody List<String> fileNames) {
        return resourceService.remove(fileNames);
    }

    @DeleteMapping("/removePic")
    private Result removePic() {
        return resourceService.removePic();
    }
}
